Class Library

Miscellaneous APIs for the RdKafka library itself.

Inheritance
System.Object
Library
Namespace:RdKafka
Assembly:cs.temp.dll.dll
Syntax
public class Library

Properties

DebugContexts

List of the supported debug contexts.

Declaration
public static string[] DebugContexts { get; }
Returns
Type Description
System.String[]

Version

Returns the librdkafka version as integer.

Interpreted as hex MM.mm.rr.xx:

  • MM = Major
  • mm = minor
  • rr = revision
  • xx = pre-release id (0xff is the final release)

E.g.: 0x000901ff = 0.9.1

Declaration
public static int Version { get; }
Returns
Type Description
System.Int32

VersionString

The librdkafka version as string.

Declaration
public static string VersionString { get; }
Returns
Type Description
System.String

Methods

SetLogLevel(Int32)

Declaration
public static void SetLogLevel(int logLevel)
Parameters
Type Name Description
System.Int32 logLevel

WaitDestroyed(TimeSpan)

Wait for all rdkafka objects to be destroyed.

Returns if all kafka objects are now destroyed, or throws TimeoutException if the timeout was reached.

Since RdKafka handle deletion is an async operation the WaitDestroyed() function can be used for applications where a clean shutdown is required.

Declaration
public static void WaitDestroyed(TimeSpan timeout)
Parameters
Type Name Description
System.TimeSpan timeout
Exceptions
Type Condition
System.TimeoutException

Timeout was reached before all objects were destroyed.